#编译libVDModule.so
#makefile version1.0
INCLUDE=-I/home/stt/Desktop/ffmpeg-4.2.2/build/include
LIBDIR=-L/home/stt/Desktop/ffmpeg-4.2.2/build/lib -lavcodec -lavdevice -lavfilter -lavformat -lavutil -lpostproc -lswresample -lswscale -lSDL2
CPPVER=--std=c++11
ALLOBJ=Clock.o VDManager.o Decoder.o Demux.o FrameQueue.o PacketQueue.o PlayController.o Resample.o Tools.o VDPlayer.o VDModule.o
CFLAGS=-fPIC
DESDIR=/home/stt/Desktop/ffmpeg-4.2.2/build/lib/

VDModule.so:$(ALLOBJ)
	g++ $(ALLOBJ) $(CFLAGS)  $(CPPVER)  $(INCLUDE) $(LIBDIR) -shared -o $(DESDIR)libVDModule.so

Clock.o:Clock.cpp
	g++ -c Clock.cpp $(CFLAGS)  $(CPPVER)  $(INCLUDE) $(LIBDIR) -o Clock.o
		
VDManager.o:VDManager.cpp
	g++ -c VDManager.cpp $(CFLAGS)  $(CPPVER)  $(INCLUDE) $(LIBDIR)  -o VDManager.o
		
Decoder.o:Decoder.cpp
	g++ -c Decoder.cpp $(CFLAGS)  $(CPPVER)  $(INCLUDE) $(LIBDIR)  -o Decoder.o
		
Demux.o:Demux.cpp
	g++ -c Demux.cpp $(CFLAGS)  $(CPPVER)  $(INCLUDE) $(LIBDIR)  -o Demux.o
		
FrameQueue.o:FrameQueue.cpp
	g++ -c FrameQueue.cpp $(CFLAGS)  $(CPPVER)  $(INCLUDE) $(LIBDIR)  -o FrameQueue.o
		
PacketQueue.o:PacketQueue.cpp
	g++ -c PacketQueue.cpp $(CFLAGS)  $(CPPVER)  $(INCLUDE) $(LIBDIR)  -o PacketQueue.o
		
PlayController.o:PlayController.cpp
	g++ -c PlayController.cpp $(CFLAGS)  $(CPPVER)  $(INCLUDE) $(LIBDIR)  -o PlayController.o
		
Resample.o:Resample.cpp
	g++ -c Resample.cpp $(CFLAGS)  $(CPPVER)  $(INCLUDE) $(LIBDIR)  -o Resample.o

Tools.o:Tools.cpp
	g++ -c Tools.cpp $(CFLAGS)  $(CPPVER)  $(INCLUDE) $(LIBDIR)  -o Tools.o
		
VDPlayer.o:VDPlayer.cpp
	g++ -c VDPlayer.cpp $(CFLAGS)  $(CPPVER)  $(INCLUDE) $(LIBDIR)  -o VDPlayer.o
		
VDModule.o:VDModule.cpp
	g++ -c VDModule.cpp $(CFLAGS)  $(CPPVER)  $(INCLUDE) $(LIBDIR)  -o VDModule.o

cleanall:
	rm -rf *.o $(DESDIR)libVDModule.so

clean:
	rm -rf *.o
